package com.zty.xiaomi.server.Service.Insurance;

import com.zty.xiaomi.server.Entity.Insurance.Insurance;
import com.zty.xiaomi.server.Mapper.InsuranceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;
@Service
public class InsuranceServiceImp implements InsuranceService{

    @Autowired
    private InsuranceMapper insuranceMapper;

    @Override
    public List<Insurance> getInsuranceByCategoryId(int category_id) throws IOException {
        List<Insurance> list = insuranceMapper.getInsuranceByCategoryId(category_id);
        return list;
    }

    @Override
    public Insurance getInsuranceByInsuranceId(int insurance_id) throws IOException {
        Insurance insurance = insuranceMapper.getInsuranceByInsuranceyId(insurance_id);
        return insurance;
    }
}
